<template>
  <div class="house-wrap">
      <div v-if="name">我是true</div>
      <div v-else>我是false</div>
    <div class="dot"></div>
    <el-button @click="handleClick">我是按钮</el-button>
  </div>
</template>
<script lang="ts" setup>
import type { PropType } from "vue";
import { defineComponent } from "vue";
import { ref } from 'vue'
  // 像在平常的setup中code
  // 但是不需要返回任何变量
  const count = ref(0)//在此处定义的count可以直接在模板html中引用
  interface userRef {
      (anythiing:boolean|number):any
  }
  let name=ref(true)
  const inc = () => {//函数也可以直接引用,而不用返回
    count.value++
  }
  const handleClick=()=>{
    name.value=!name.value
  }
</script>
<style lang="less" scoped>

</style>

